package com.funtonow.jqdk.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.funtonow.jqdk.R;
import com.funtonow.jqdk.bean.NewsBean;
import com.funtonow.jqdk.utils.GlideUtils;

/**
 * @author Jiajien
 * @date 2019/8/2
 */
public class ZxAdapter extends BaseQuickAdapter<NewsBean, BaseViewHolder> {


    public ZxAdapter() {
        super(R.layout.item_zx_layout);
    }

    @Override
    protected void convert(BaseViewHolder helper, NewsBean item) {
        helper.setText(R.id.tv_news_title, item.getTitle())
                .setText(R.id.tv_news_time, item.getTime());
        ImageView newsImage = helper.getView(R.id.iv_news_image);
        GlideUtils.setHeadImg(newsImage, item.getImage());

    }


}
